package com.gordianyuan.dubbo.web.client;

import com.alibaba.dubbo.config.ApplicationConfig;
import com.fasterxml.jackson.databind.ObjectMapper;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class DubboWebClientConfiguration {

	@Bean
	public ApplicationConfig applicationConfig(@Value("${app.name}") String appName) {
		return new ApplicationConfig(appName);
	}

	@Bean
	public ObjectMapper createObjectMapper() {
		ObjectMapper mapper = new ObjectMapper();
		return mapper;
	}
}
